using System;
using System.Data;

namespace Model
{
	/// <summary>
	/// Summary description for DatabaseStorage.
	/// </summary>
	public class DatabaseStorage
	{
		private string fileName;
		DataSet myDataSet;

		public DatabaseStorage(string fileName)
		{
			this.fileName=fileName;
			myDataSet = new DataSet();
			OpenFile(fileName);

			//myDataSet.ReadXml(this.fileName);
		}

		public string FileName
		{
			get
			{
				return fileName;
			}
			set
			{
				fileName = value;
			}
		}

		/// <summary>
		/// To open the DB file(XML file)
		/// To create the DataSet
		/// </summary>
		public void OpenFile(string fileName)
		{
			myDataSet.ReadXml(fileName);
		}

		/// <summary>
		/// To close the DB file(XML file)
		/// To update the DataSet
		/// </summary>
		public void CloseFile()
		{
		}
	
		public DataSet MyDataSet
		{
			get
			{
				return myDataSet;
			}
			set
			{
				myDataSet = value;
			}
		}
	}
}
